package com.fenyin.samples.study.jvm.gc;  



/**
 * VM args:-verbose:gc -Xms20M -Xmx20M -Xmn10M -XX:SurvivorRatio=8 -XX:+PrintGCDetails -XX:HandlePromotionFailure=false
 *@Title:  
 *@Description:  空间分配担保
 *@Author:fengzhichao  
 *@Since:2012-8-25  
 *@Version:1.1.0
 */
public class PromiseAllocation {

	private static int _1MB = 1024*1024;
	
	public static void main(String[] args){
		byte[] allocation1 = new byte[2*_1MB];
		byte[] allocation2 = new byte[2*_1MB];
		byte[] allocation3 = new byte[2*_1MB];
		allocation1 = null;
		byte[] allocation4 = new byte[2*_1MB];
		byte[] allocation5 = new byte[2*_1MB];
		byte[] allocation6 = new byte[2*_1MB];
		allocation4 = null;
		allocation5 = null;
		allocation6 = null;
		byte[] allocation7 = new byte[2*_1MB];
	}
}